import 'package:earclean/app/util/Yue_utils.dart';
import 'package:get/get.dart';

class JishiController extends GetxController {
  final list = [].obs;
  String projectTimer = '';
  String projectName = '';
  int projectPrice = 0;
  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    Map info = Get.arguments ?? {};
    projectTimer = info['projectTimer'] ?? '';
    projectName = info['projectName'] ?? '';
    projectPrice = info['projectPrice'] ?? 0;
    list.value = info['list'] ?? [];
    super.onReady();
  }

  // 预约
  toYue(Map item) {
    YueUtils.yuyue({
      'id': item['id'],
      'name': item['nickname'],
      'title': projectName,
      'pic': item['avatar'],
      'timer': projectTimer,
      'price': projectPrice,
    });
  }

  @override
  void onClose() {}
}
